* Generate Table A9 (sector-level regressions)
set matsize 10000
egen countrysectorid = group(ccode sector)
egen yeardiff = group(year D)
egen yeardiff2 = group(year Recent)
label var ratio "log(SI)"
xi: quietly regress ratio deva i.ccode i.sector i.year i.yeardiff i.yeardiff2 , r // differential year FE
estimates store One
xi: quietly regress ratio deva i.countrysectorid i.year i.yeardiff i.yeardiff2 , r // differential year FE, country-sector FE
estimates store Two
xi: quietly regress ratio deva i.countrysectorid*year, r // country-sector specific linear time trend
estimates store Three
xi: quietly regress ratio deva lRGDP financial default restru i.ccode*i.sector i.year i.yeardiff i.yeardiff2 , r // differential year FE, country-sector FE
estimates store Four
esttab One Two Three Four, keep(deva ) b(%9.3f) se stats(r2 N) star(* 0.1 ** 0.05 *** 0.01)
esttab One Two Three Four using "`1'/TableA9.csv", label keep(deva  ) b(%9.2f) se stats(r2 N) star(* 0.1 ** 0.05 *** 0.01) replace

